﻿//添加
var fnCustomAdd = function () {
    var pagetitle = "添加客户交往记录";
    parent._employeeTitle = pagetitle;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=Cst_activity"));
    //parent.NeedRefreshPage = this;
}

//-----------------------------------------
//编辑
//-----------------------------------------
var fnCustomEdit = function (key) {
    var row = fnGetSelectedRow();

    if (row == null) {
        alert("请选择一条记录");
        return;
    }
    var pagetitle = "修改客户交往记录—" +row["Atv_cust_name"] ;
    parent.addTabs(pagetitle, encodeURI("../Extend/Edit.aspx?r=" + Math.random() + "&entity=Cst_activity&id=" + row[const_entityID]));
    //parent.NeedRefreshPage = this;
}

/*格式化的方法*/
var fnFormatDesc = function (e) {
    var sData = e.value;
    if (sData.length > 33) sData = sData.substring(0, 33) + "...";
    return sData;
}
